<template>
  <div class="progress-info">
    <div class="title">{{ title }}</div>
    <div class="completed a-l_c">
      <span>已做 </span><span class="computed-item">{{ completed }}</span>
    </div>
    <div class="total a-l_c">
      <span>全部 </span><span>{{ total }}</span>
    </div>
  </div>
</template>

<script setup lang="ts">
const props = defineProps({
  title: {
    type: String,
    required: true,
  },
  completed: {
    type: Number,
    required: true,
  },
  total: {
    type: Number,
    required: true,
  },
});
</script>

<style scoped>
.progress-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 10px;

  /* padding: 10px; */
  /* border: 1px solid #ddd; */
  /* border-radius: 5px; */
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
}

.title {
  font-weight: bold;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.completed,
.total {
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

.completed .computed-item {
  color: #126983;
  font-size: 14px;
  font-weight: 600;
}

.completed span:nth-child(1),
.total span:nth-child(1) {
  flex-shrink: 0;
}

.completed span:nth-child(2),
.total span:nth-child(2) {
  font-weight: bold;
  color: #333;
  margin-left: 10px;
}
</style>
